from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton
from PyQt5.QtGui import QIcon

class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("Resource Example")
        self.setGeometry(100, 300, 800, 600)
        
        button = QPushButton("button", self)
        button.move(200, 200)
        
        self.setWindowIcon(QIcon("../Resources/cmd.png")) # 设置的是常驻状态栏的图标

if __name__ == "__main__":
    app = QApplication([])
    window = MainWindow()
    window.show()
    app.exec()
